﻿define(["service/service", "service/httpService"], function (service) {
    service.factory("noticeService", function (httpService) {
        var methods = {
            gets: function (params) {
                return httpService.get("/admin/notice/gets", params);
            },
            get: function (params) {
                return httpService.get("/admin/notice/get", params);
            },
            "update": function (params) {
                return httpService.post("/admin/notice/update", params);
            },
            "add": function (params) {
                return httpService.post("/admin/notice/add", params);
            },
            "delete": function (id) {
                return httpService.delete("/admin/notice/delete/" + id);
            },
            "publish": function (id) {
                return httpService.post("/admin/notice/publish/" + id);
            }
        }
        return methods;
    });
});